#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 1e5 + 5;
const int MOD = 1e9 + 7;

int n, k, sz[N];
vector<int> ch[N];
int dp[N][105][2][2];
int tmp[105][2][2];

void dfs(int u, int fu) {
  sz[u] = 1;
  dp[u][1][1][0] = 1;
  dp[u][0][0][0] = 1;
  for (int v : ch[u]) {
    if (v == fu) continue;
    dfs(v, u);
    rep(i, 0, min(sz[u], k)) {
      rep(s1, 0, 1) rep(s2, 0, 1) tmp[i][s1][s2] = dp[u][i][s1][s2],
                                  dp[u][i][s1][s2] = 0;
    }
    rep(i, 0, min(sz[u], k)) {
      rep(j, 0, min(sz[v], k - i)) {
        rep(s1, 0, 1) rep(s2, 0, 1) rep(t1, 0, 1) rep(t2, 0, 1) {
          int s3 = s2 || t1;
          int t3 = s1 || t2;
          if (!t3) continue;
          dp[u][i + j][s1][s3] =
              (dp[u][i + j][s1][s3] +
               1ll * tmp[i][s1][s2] * dp[v][j][t1][t2] % MOD) %
              MOD;
        }
      }
    }
    sz[u] += sz[v];
  }
}

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> k;
  rep(i, 2, n) {
    int u, v;
    cin >> u >> v;
    ch[u].push_back(v);
    ch[v].push_back(u);
  }
  dfs(1, 1);
  cout << (dp[1][k][1][1] + dp[1][k][0][1]) % MOD;
  return 0;
}